<template>
  <vol-box
    :lazy="true"
    v-model="model"
    title="月度更新"
    :height="400"
    :width="700"
    :padding="5"
    :onModelClose="onModelClose"
  >
  <div class="block">
    <span class="demonstration">月</span>
    <el-date-picker
      v-model="value2"
      type="month"
      value-format="YYYY-MM"
      placeholder="选择月">
    </el-date-picker>
  </div>
    <template #footer>
      <div>
        <el-button type="primary" size="small" @click="updateMonthTime()">确认</el-button >
        <el-button type="default" size="small" @click="model = false" >点击关闭弹出框</el-button >
      </div></template>
  </vol-box>
</template>

<script>
import VolBox from '@/components/basic/VolBox.vue';
//这里使用的vue2语法，也可以写成vue3语法
export default {
  
  components: { 'vol-box': VolBox },
  methods: {},
  data() {
    return {    
      value2: '',
      param:{
        value2 : this.value2
      },   
      model: false
    };
  },
  methods: {
    open(){
      this.model = true;
    },
    updateMonthTime(){      
         
      // var b = "123";
      this.http.get("api/Month_Asses/MonthlyAttendance?value2="+this.value2, {}, false).then((result) => {
        this.$message.success(result);
        this.model = false;
      });    
    }
  }
};
</script>


